#include "game.h"

void menu()
{
	printf("~~~~~~~~~~~~~~\n");
	printf("~~~ 0.quit  ~~\n");
	printf("~~~ 1.start ~~\n");
	printf("~~~~~~~~~~~~~~\n");
	printf("~please select:>");
}

void game()
{
	InitBoard(mine, ROWS, COLS, '0');
	InitBoard(show, ROWS, COLS, '*');
	CreateMine(ROW, COL);
	DisplayBoard(show, ROW, COL);
	FindMine(mine, show, ROW, COL);
}

int main()
{
	srand((unsigned int)time(NULL));
	int input;
	do
	{
		menu();
		scanf("%d", &input);
		switch (input)
		{
		case 0:
			printf("game exit\n");
			break;
		case 1:
			game();
			break;
		default:
			printf("err, input again\n");
			break;
		}
	} while (input);
	return 0;
}